package com.datastructure.test.repeatsubstring;

public class RepeatSubstring {

    public static void main(String[] args) {
        RepeatSubstring repeatSubstring = new RepeatSubstring();
        boolean nowcodernowcoder = repeatSubstring.repeatSubstring("sss");
        System.out.println(nowcodernowcoder);
    }

    public boolean repeatSubstring (String str) {
        // write code here
        return (str+str).substring(1, str.length()*2 - 1).contains(str);
    }
}
